package com.team.sns.services.impl;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.team.sns.entities.Actor;
import com.team.sns.persistence.impl.JPAProvider;
import com.team.sns.services.ActorService;
@Service
@Transactional
public class ActorServiceBean extends JPAProvider<Actor> implements ActorService{

	public List<Actor> getActorByUser(Integer userId) {
		String hql = "from Actor where userId = :userId";
		Object[] arr = new Object[1];
		arr[0] = userId;
		
		List<Actor> lst = this.getResultList(0, 100, hql, arr);
		return lst;
	}

}
